package com.network.monitor.bean;

import com.network.monitor.utils.NetWorkUtils;

import java.io.Serializable;
import java.util.LinkedHashMap;

/**
 * 项目名称：com.network.monitor.bean
 * 创建人:LuoFG
 * 创建时间:2022/3/4  16:36
 * 描述:
 * 作用:
 */
public class NetWorkInfoBean implements Serializable {

    private NetworkFeedBean networkFeedBean;

    private NetworkTraceBean networkTraceBean;


    public NetWorkInfoBean(NetworkFeedBean networkFeedBean, NetworkTraceBean networkTraceBean) {
        this.networkFeedBean = networkFeedBean;
        this.networkTraceBean = networkTraceBean;
    }

    public NetworkFeedBean getNetworkFeedBean() {
        return networkFeedBean;
    }

    public void setNetworkFeedBean(NetworkFeedBean networkFeedBean) {
        this.networkFeedBean = networkFeedBean;
    }

    public NetworkTraceBean getNetworkTraceBean() {
        return networkTraceBean;
    }

    public void setNetworkTraceBean(NetworkTraceBean networkTraceBean) {
        this.networkTraceBean = networkTraceBean;
    }


    public LinkedHashMap<String, Long> getTimeInfoMap(){
        return NetWorkUtils.transformToTraceDetail(networkTraceBean.getNetworkEventsMap());
    }
}
